/**
 * Created by lz on 2017/4/27.
 */
import Reflux from 'reflux';
import Action from './action';
import Ajax from '../../utils/ajax';

let store = Reflux.createStore({
    listenables: Action,
    onGetList(callback){
        Ajax.get('?c=main&a=index')
            .then(function (response) {
                var obj = response.data;
                callback(obj);
            })
            .catch(function (error) {
                console.log(error);
            });
    },
});

export default store;